#ifndef __X_STRING_H
#define __X_STRING_H

#include <stdio.h>
#include <stdlib.h>
#include <sys/param.h>
#include <string.h>
#include <stdbool.h>
#include <bits/types.h>

struct string_t
{
    unsigned char *data;
    int len;
};

void print_string(struct string_t *source);
struct string_t *init_string(const unsigned char *str, int len);
struct string_t *sub_string(struct string_t *source, int pos, int len);
bool compare_string(struct string_t *first, struct string_t *second);
int find_string(struct string_t *source, struct string_t *pattern);
// with WDKY standard
int brute_force_match_algo(struct string_t *source, struct string_t *pattern);

#endif